package main

import (
	"fmt"
	"log"

	"chat-app/pkg/database"
)

func main() {
	db, err := database.InitDB()
	if err != nil {
		log.Fatalf("Failed to connect to database: %v", err)
	}

	if err := database.MigrateModels(db); err != nil {
		log.Fatalf("Migration failed: %v", err)
	}

	fmt.Println("✅ Database connection and migration successful!")
}
